import { HttpException } from "@nestjs/common";

export class CustomHttpExceptionUtils {
  constructor(statusCode: number, message: string, error?: string) {
    // 抛出一个HttpException实例
    throw new HttpException(
      {
        statusCode,
        message,
        error,
      },
      statusCode,
    );
  }
}
